<template>
  <div class="login">
    <h1>登录</h1>
    <AuthForm submitText="登录" @success="handleLoginSuccess" />
    <p>还没有账号？<router-link to="/register">立即注册</router-link></p>
  </div>
</template>

<script>
import AuthForm from '@/components/AuthForm.vue'

export default {
  components: {
    AuthForm
  },
  methods: {
    handleLoginSuccess() {
      this.$router.push('/')
    }
  },
  name: 'LoginPage'
}
</script>